//
// Created by ZLY on 2025/5/12.
//

#ifndef SCENE_TITLE_H
#define SCENE_TITLE_H
#include "core/scene.h"
#include "screen/hud_text.h"
#include "screen/ui_mouse.h"

class HUDButton;

class SceneTitle : public Scene {
private:
    void renderBackground();

    float color_timer_ = 0;

protected:
    SDL_FColor boundary_color_ = {0.5, 0.5, 0.5, 1};
    HUDButton *button_start_ = nullptr;
    HUDButton *button_credits_ = nullptr;
    HUDButton *button_exit_ = nullptr;
    HUDText *credits_text_ = nullptr;
    UIMouse *mouse_ = nullptr;

public:
    void init() override;

    void render() override;

    void update(float dt) override;

    void clean() override;

    bool handleEvents(SDL_Event &event) override;

    void loadData(const std::string &file_path) override;

    void updateColor();

    void checkButtonQuit();

    void checkButtonCredits();

    void checkButtonStart();
};


#endif //SCENE_TITLE_H
